package ooday03;

public class Test {
    public static void main(String[] args) {
        Dog[]dogs=new Dog[3];
        dogs[0]=new Dog("小黑",3,"白色");
        dogs[1]=new Dog("小白",2,"黑色");
        dogs[2]=new Dog("小灰",2,"灰色");
        for (int i = 0; i <dogs.length ; i++) {
            System.out.println(dogs[i].name);
            dogs[i].eat();
        }

        Chick[]chicks=new Chick[2];
        chicks[0]=new Chick("蔡徐坤",2,"黑色");
        chicks[1]=new Chick("坤坤",2,"黑白色");
        for (int i = 0; i <chicks.length; i++) {
            chicks[i].eat();
            chicks[i].drink();
            chicks[i].dance();
        }

        Fish[]fish=new Fish[5];
        fish[0]=new Fish("大的鱼",1 ,"红色");
        fish[1]=new Fish("中的鱼",2 ,"黄色");
        fish[2]=new Fish("小的鱼",3 ,"蓝色");
        fish[3]=new Fish("很大的鱼",4 ,"橙色");
        fish[4]=new Fish("巨大的鱼",5 ,"绿色");
        for (int i = 0; i <fish.length ; i++) {
            fish[i].eat();
            fish[i].swim();
            fish[i].drink();
        }
    }

}
